﻿using System;
using System.Collections.Generic;
using System.Text;
using Memento.Persistence;
using Memento.Persistence.Interfaces;
using Memento.Test.Entities;
using Octopus.Injection.Commons;
using Octopus.Injection.Commons.Interceptor;
using Octopus.Injection.Commons.Interceptor.Injection;

namespace Octopus.Test.Client
{
    [Injection]
    public class DummyTest2 : AspectSupport
    {
        public int A { get; set; }
        public string B { get; set; }
        public long C { get; set; }

        public IPersistence<Producto> ProductoPerSvc { get; set; }

        public DummyTest2()
        {
        }

        public DummyTest2(int a, string b, long c)
        {
            A = a;
            B = b;
            C = c;
        }

        public string TestMe(string a, int rep)
        {
            string b = a;

            for (int i = 1; i < rep; i++)
            {
                b += b;
            }

            var prod = new Producto();
            prod.Nombre = b;

            ProductoPerSvc.PersistEntity(prod);

            return b;
        }
    }
}
